#ifndef FPS_THREAD_HH
# define FPS_THREAD_HH

# include "game-thread.hh"
# include "octree/octree_fps.hh"

# include "game/game-manager.hh"

#include <boost/thread.hpp>

class FpsThread: public GameThread
{
public:
  //the acc thing is a little bit crappy but should work for now
  FpsThread (Server* s,
	     const tbb::concurrent_hash_map<int, boost::shared_ptr<Client> >& cl,
	     ObjVect* objvect,
	     tbb::concurrent_hash_map<int, boost::shared_ptr<Client> >::accessor& acc);

  ~FpsThread ();

  virtual void run ();

  void add_player (int id, boost::shared_ptr<Client> player);
  void add_obj (Object* obj);

  void remove_player (int id);
protected:
  boost::thread t_;
  tbb::concurrent_hash_map<int, boost::shared_ptr<Client> > players_;
  OctreeFps* oct_;
  GameManager gm_;
};

#endif /// !FPS_THREAD_HH
